<template>
  <div>
    <h2>总价格: {{ $store.getters.totalPrice }}</h2>
    <h2>总价格: {{ $store.getters.totalPriceCoutGreaterN(2) }}</h2>
    <hr />
    <h2>{{ nameInfo }}</h2>
    <h2>{{ ageInfo }}</h2>
    <hr />
  </div>
</template>

<script>
import { computed } from "vue";
import { useStore } from "vuex";
import useGetters from "../hooks/useGetters";

export default {
  setup() {
    const store = useStore();

    // const sNameInfo = computed(() => store.getters.nameInfo);

    const storeGetters = useGetters(["nameInfo", "ageInfo"]);

    return { ...storeGetters };
  },
};
</script>

<style scoped></style>
